package com.sunstar.liveplugin.view.live

import android.app.Activity
import android.util.Log
import com.sunstar.liveplugin.view.live.VideoViewFactory
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugin.platform.PlatformViewRegistry

class VideoViewPlugin {
    companion object {
        @JvmStatic
        fun registerWith(registrar: PluginRegistry.Registrar) {
            registrar.platformViewRegistry().registerViewFactory("com.sunstar.liveplugin.videoView", VideoViewFactory(registrar,registrar.activity(),registrar.messenger()))
        }
        @JvmStatic
        fun registerWith(platformViewRegistry: PlatformViewRegistry,registrar: PluginRegistry.Registrar,activity: Activity,messager:BinaryMessenger) {
            platformViewRegistry.registerViewFactory("com.sunstar.liveplugin.videoView", VideoViewFactory(registrar,activity,messager))
        }
    }
}